package com.hqizcc.ltcs.hqbsltcs.controller;

import com.hqizcc.ltcs.hqbsltcs.service.GetCountyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class GetCountyController {

    @Autowired
    private GetCountyService getCountyService;

    @RequestMapping(value = "getCounty")
    public String getTown(){

        boolean result = getCountyService.getCounty();

        if (result){

            System.out.println("爬取页面成功");

            return "index";
        } else {

            System.out.println("爬取页面失败");

            return "error";
        }
    }

}
